<?php
$default_settings = $settings->get_settings();
?>
<div id="settings-form" title="Настройки" style="display: none;">
	<form id="ss-form">
	<fieldset>
                <table border="1" class="tbsetting">
                    <tr><th colspan="2">Показывать графики за</th></tr>
                    <?php foreach($this->config->item('form_period') as $key => $value): ?>
                        <tr><td width="120" class="checkb"><input type="checkbox" name="period[]" value="<?php echo $key; ?>" id="" <?=checked_exists($default_settings['chart_period'],(string)$key)?>/></td><td><?=$value?></td></tr>
                    <?php endforeach; ?>
                    <tr><th colspan="2">Дополнительные опции</th></tr>
                    <?php foreach($this->config->item('chart_mode') as $key => $value): ?>
                        <tr><td class="checkb"><input type="checkbox" name="chartmode[]" value="<?=$key?>" id="" <?=checked_exists($default_settings['chart_mode'],(string)$key)?>/></td><td><?=$value[1]?></td></tr>
                    <?php endforeach; ?>
                    <tr><th colspan="2">Размер графиков</th></tr>
                    <tr><td>Ширина</td><td><input type="text" name="widthchart" maxlength="4" id="widthchart" value="<?=$default_settings['chart']['width']?>"/></td></tr>
                    <tr><td>Высота</td><td><input type="text" name="heightchart" maxlength="4" id="heightchart" value="<?=$default_settings['chart']['height']?>"/></td></tr>
                    <tr><th colspan="2"><input type="checkbox" id="usepreview" name="usepreview" <?=@$default_settings['chart']['usepreview']?> /> Использовать превью</th></tr>
                    <tr><td>Ширина превью</td><td><input type="text" name="widthpreview" maxlength="3" id="widthpreview" value="<?=@$default_settings['chart']['widthpreview']?>" disabled="disabled" /></td></tr>
                    <tr><td>Высота превью</td><td><input type="text" name="heightpreview" maxlength="3" id="heightpreview" value="<?=@$default_settings['chart']['heightpreview']?>" disabled="disabled" /></td></tr>
                    <tr><th colspan="2">Период обновления</th></tr>
                    <tr><td>Интервал</td><td>
                        <select name="reloadchart">
                            <?php foreach($this->config->item('chart_reload') as $key => $value): ?>
                                <option value="<?=$key?>"  <?=($default_settings['chart']['reload'] == $key)?'selected':''?>><?=$value?></option>
                            <?php endforeach; ?>
                        </select>
                    </td></tr>
                </table>
	</fieldset>
	</form>
</div>